<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>01-intro</title>
	<script type="text/javascript" src="js/mu.js" charset="utf-8"></script>

        <script type="text/javascript" charset="utf-8">
            var console = {
                log:function(msg){
                    document.getElementById('consoleDisplay').innerHTML = document.getElementById('consoleDisplay').innerHTML+ msg +'<BR>';
                }
            }

        </script>
        <link rel="stylesheet" href="slide.css" type="text/css">

</head>

<body>

    <div id="header">
        Intro
    </div>

<section id="sectionCode" contenteditable="true">
<pre id="code">
function Animal(){
    this.Name;
    this.eat=function(){
            console.log(this.Name+" is Eating ...");
    }
    //Constructor of Animal
    this.Animal=function(name){
            this.Name=name;
    }
}

var something = $(Animal).New("Something");
something.eat();

function Dog(){
    //inheritance
    $(this).Extends(Animal);

    this.woof = function(){console.log(this.Name+" is Woofing ...");}
    this.Dog=function(name){
            //Call Parent constructor
            this.Animal(name);
    }
}

var Wolf = $(Dog).New("Wolfy");
Wolf.eat();
Wolf.woof();

console.log("---------------------------------------------------");
console.log(something.constructor.name);
console.log($(something).Is(Animal)+" "+$(something).Is(Dog));
console.log(Wolf.constructor.name);
console.log($(Wolf).Is(Animal)+" "+$(Wolf).Is(Dog));

</pre>
    
</section>
<section id="footer" contenteditable="true">
<pre id="consoleDisplay">
</pre>
</section>
<script>eval(document.getElementById('code').innerHTML);</script>
</body>
</html>
